﻿using Tfs.OnTheRoad.Model;
namespace Tfs.OnTheRoad.ViewModel
{
    /// <summary>
    /// Attachments List ViewModel
    /// </summary>
    public class AttachmentListViewModel : BaseListViewModel<Attachment>
    {
        WorkItem _ownerWorkItem;
        public AttachmentListViewModel(WorkItem ownerWorkItem)
            : base()
        {
            PageTitle = "Attachments";
            _ownerWorkItem = ownerWorkItem;
        }

        public AttachmentListViewModel(string path)
            : base(path)
        {
        }

        public override string GetNoResultsFoundMessage()
        {
            return "No Attachments were found for this Work Item.";
        }

        public override string GetEntityCollectionName()
        {
            return string.Format("WorkItems({0})/Attachments", _ownerWorkItem.Id);
        }
    }
}
